package com.kakarote.hrm.constant;

import lombok.Getter;

@Getter
public enum DegreeEnum {
    ONE(1, "学士"),
    TWO(2, "硕士"),
    THREE(3, "博士"),
    NINE(9, "其他");

    private Integer value;
    private String name;

    DegreeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(Integer value) {
        for (DegreeEnum educationEnum : DegreeEnum.values()) {
            if (educationEnum.getValue().equals(value)) {
                return educationEnum.getName();
            }
        }
        return "";
    }


}
